inspath=/home/sunqian


mkdir -p $inspath && cd $inspath;
basearch=`arch`
wget https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda-repo-rhel8-11-0-local-11.0.3_450.51.06-1.$basearch.rpm --no-check-certificate 
sudo rpm -i cuda-repo-rhel8-11-0-local-11.0.3_450.51.06-1.$basearch.rpm
yum -y install cuda

mkdir -p $inspath && cd $inspath;
basearch=`arch`
sudo yum install -y python3 python3-devel
pip3 install -U pip setuptools
pip3 install tensorflow-cpu==2.4.0


mkdir -p $inspath/bitfusion && cd $inspath/bitfusion
git clone https://hub.yzuu.cf/tensorflow/benchmarks.git
cd benchmarks
git checkout cnn_tf_v2.1_compatible
cd ..
python3 ./benchmarks/scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py --device cpu --data_format=NHWC --model=resnet50
python3 ./benchmarks/scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py --device cpu --data_format=NHWC --model=inception3